import HttpService from './baseHttp'
// // 数据字典接口

// 获取全局的组织
export const HttpSysOrgList = (data, config) => HttpService.post('/api/v1/Organization/selectByPage', data, { ...config, baseURL: process.env.VUE_APP_APIURL_UC })
// 项目
export const HttpProductList = (data = {}) => HttpService.get('/api/v1/ProductLine/findAllByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })
// 全部项目（包含已关闭，已停用的）,区分组织
export const HttpAllProductList = (data = {}) => HttpService.get('/api/v1/ProductLine/findAllByContextIdBesideFlag', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })
// 全部项目（不分组织，不包含已关闭，已停用的）
export const HttpProductLineAllList = (data = {}) => HttpService.get('/api/v1/ProductLine/findAllByOrgIdInAndIdIn', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })
// 全部项目（不分组织，包含已关闭，已停用的）
export const HttpProductLineWithoutOrgAllList = (data = {}) => HttpService.get('/api/v1/ProductLine/findAllWithOutOrg', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })

//查询所有可访问组织
export const HttpSysList = (data = {}) => HttpService.get('/api/v1/Context/findAllByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_UC })
export const HttpUserList = (data = {}) => HttpService.get("/api/v1/User/findAllByContextId", { params: data, baseURL: process.env.VUE_APP_APIURL_UC });

// 渠道
export const HttpAccountList = (data = {}) => HttpService.get('/api/v1/Account/findAllByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })
// 仓库
export const HttpWarehouseList = (data = {}) => HttpService.get('/api/v1/OrganizationWarehouse/findAllByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })
// 组织
export const HttpOrgList = (data = {}) => HttpService.get('/api/v1/Organization/findAll', { params: data, baseURL: process.env.VUE_APP_APIURL_UC })
// 当前组织下的全部管理组织
export const HttpAllNowManageOrgList = (data = {}) => HttpService.get('/api/v1/Organization/findAllContextBind', { params: data, baseURL: process.env.VUE_APP_APIURL_UC })
// 当前组织下的有权限管理组织
export const HttpNowManageOrgList = (data = {}) => HttpService.get('/api/v1/Context/organizationDataAccess', { params: {module:'Organization',oid:global.SYSID,...data}, baseURL: process.env.VUE_APP_APIURL_UC })
//

// 查询所有承运商服务信息
export const HttpCarrierList = (data = {}) => HttpService.get('/api/v2/SystemDeliveryCarrier/findAllCarrier', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })
// 获取到所有的国家
export const HttpCountryList = (data = {}) => HttpService.get('/commonregions/getAllCountry', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })


// 获取cope当前的客户项目列表
export const HttpCopeCusList = (data = {}) => HttpService.post("/api/v2/productLine/findByWarehouseOrgId", data, { baseURL: process.env.VUE_APP_APIURL_FBB });

// 计费管理
// 计费管理分类
// 获取所有的计费分类
export const HttpCategory = (data = {}) => HttpService.get("/api/v2/billingCategory/findAll", { params: data, baseURL: process.env.VUE_APP_APIURL_FBB });
// 查询单个的计费分类（编辑）
// 客户费率列表
// 客户组织列表
export const HttpCusOrgList = (data = {}) => HttpService.post("/api/v2/customerRate/getCustomerOrganization", data, { baseURL: process.env.VUE_APP_APIURL_FBB });
// 获取当前组织的仓库
export const HttpCusWareList = (data = {}) => HttpService.post("/api/v2/customerRate/getHostWarehouse", data, { baseURL: process.env.VUE_APP_APIURL_FBB });
// 获取当前组织的仓库和fba仓库
export const HttpHostAndFbaWarehouse = (data = {}) => HttpService.post("/api/v2/customerRate/getHostAndFbaWarehouse", data, { baseURL: process.env.VUE_APP_APIURL_FBB});

// 获取当前用户管理的仓库
export const HttpUserManageWarehouse = (data = {}) => HttpService.post("/api/v2/customerRate/getWarehouseByUser", data, { baseURL:process.env.VUE_APP_APIURL_FBB});

// 获取管理全部渠道（包含失效）
export const HttpAllCusAccountList = (data = {}) => HttpService.get('/api/v1/Account/findAllByContextIdInManage', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })
// 获取管理渠道（不包含失效）
export const HttpCusAccountList = (data = {}) => HttpService.get('/api/v1/Account/findAllByContextIdInManageUseful', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })

// 事物类型包含
export const HttpWorkTypeList = (data) => HttpService.get('/api/v2/processedTransaction/findByClientOrgId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB });
// 查询所有附件模块
export const HttpGetAllExcelModels = (data) => HttpService.get('/api/v1/BizAttach/models', { params: data, baseURL: process.env.VUE_APP_APIURL_UC });
// 查询附件所有类型
export const HttpGetAllExcelTypes = (data) => HttpService.get('/api/v1/BizAttach/types', { params: data, baseURL: process.env.VUE_APP_APIURL_UC });

// 过滤掉禁用状态的仓库
export const HttpFilterDisabledWarehouse = (data = {}) => HttpService.get('/api/v2/organizationWarehouse/findOrgWarehousesByOrgId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })

// 当前组织的下属组织
export const HttpNextOrgList = (data = {}) => HttpService.get('/api/v1/Context/organizationClients', { params: {module:'Organization', oid:global.SYSID,...data}, baseURL: process.env.VUE_APP_APIURL_UC })
// 当前组织的下属组织（包含本组织）
export const HttpNextOrgSelfList = (data = {}) => HttpService.get('/api/v1/Context/organizationClients', { params: {module:'Organization', oid:global.SYSID, includeSelf: 1, ...data}, baseURL: process.env.VUE_APP_APIURL_UC })

// 当前组织的上属组织
export const HttpBeforeOrgList = (data = {}) => HttpService.get('/api/v1/Context/organizationHosts', { params: {module:'Organization', oid:global.SYSID,...data}, baseURL: process.env.VUE_APP_APIURL_UC })


// 删除附件-编辑
export const HttpDelAttach = (data = {}, config) => HttpService.get('/api/v2/Supplier/delRelAttach', { params: data })

// 删除附件-新增
export const HttpDelAttachNew = (data = {}) => HttpService.get('/api/v1/BizAttach/del', { params: data, baseURL: process.env.VUE_APP_APIURL_UC })

//全部仓库（不分组织）
export const HttpWarehouseAllList = (data = {}) => HttpService.get('/api/v1/OrganizationWarehouse/findAllByOrgIdInAndIdIn', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })
// 获取地区
export const HttpAreaList = (data = {}) => HttpService.get('/api/v2/areaManage/query', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB})
// 客户有权限地区
export const HttpAreaListByCustomer = (data = {}) => HttpService.get('/api/v2/areaManage/queryByCustomer', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB})


// 承运商分组的下拉  管理端查询/客户端
export const HttpGetCarrierManageList = (data = {}, config) => HttpService.get('/api/v2/carrierGroup/findByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })
export const HttpGetCarrierCusList = (data = {}, config) => HttpService.get('/api/v2/carrierGroup/findByOrgId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })

// 请求全部物流产品服务的有效code
export const HttpGetAllActiveLogiticdProCodeList = (data = {}, config) => HttpService.get('/api/v2/carrierVolumeWeight/findByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })

// 物流商模块使用的物流产品和物流产品服务的下拉（包含失效与有效）
export const HttpGetAllLogProCodeList = (data = {}, config) => HttpService.get('/api/v2/carrierGroup/findAllByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })
export const HttpGetAllLogProSerCodeList = (data = {}, config) => HttpService.get('/api/v2/carrierVolumeWeight/findAllByContextId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })

// 获取渠道类型（店铺类型）
export const HttpAllaccountType = (data = {}) => HttpService.get('/api/v1/ChannelCategory/findAllByType', { params: data, baseURL: process.env.VUE_APP_APIURL_BOSS })

// 库存报表仓库包含中转仓接口（包含中转仓的组织仓）
export const HttpTransferWarehouse = (data = {}) => HttpService.get('/api/v2/organizationWarehouse/findAllWarehouseByOrgId', { params: data, baseURL: process.env.VUE_APP_APIURL_FBB })
// 计费-包含中转仓
export const HttpBillTransferWarehouse = (data = {}) => HttpService.post('/api/v2/customerRate/getAllHostWarehouse', data, { baseURL: process.VUE_APP_APIURL_FBB });
// 库存报表管理端仓库包含中转仓接口（用户被分配仓库权限的仓库）
export const HttpAdminTransferWarehouse = (data = {}) => HttpService.post('/api/v2/customerRate/getAllWarehouseByUser', data, { baseURL: process.env.VUE_APP_APIURL_FBB })

// 系统仓中包含中转仓（包含中转的所有系统仓）
export const HttpTransferHostWarehouse = (data = {}) => HttpService.post('/api/v2/customerRate/getAllHostWarehouse', data, { baseURL: process.env.VUE_APP_APIURL_FBB })

